package util;

import model.MoveChooser;
import model.Position;

import java.util.List;
import java.util.Random;

/**
 * @author Alex Vikharev vikharev@yandex-team.ru
 *         created 27.02.12
 */
public class RandomMoveChooser implements MoveChooser {
    private final Random random = new Random();

    @Override
    public Position choose(final List<Position> possibleMoves) {
        return possibleMoves.get(random.nextInt(possibleMoves.size()));
    }
}
